/**
 *
 */
package com.magist.manage.enums;


import com.magist.core.enums.BaseEnum;
import com.magist.core.util.TxtUtil;

/**
 * 沟通状态枚举
 */
public enum ContactStatusEnum implements BaseEnum {

        UNLINK("UNLINK","未联系"),LINKED("LINKED","已联系");
    private String code;

    private String desc;

    private ContactStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ContactStatusEnum getByCode(String code) {
        if (TxtUtil.isEmpty(code))
            return null;
        ContactStatusEnum[] allEnums = ContactStatusEnum.values();
        for (ContactStatusEnum thisEnum : allEnums) {
            if (thisEnum.code.equals(code)) {
                return thisEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
